//
//  TMTeacherDetailHeader.m
//  国学商家管理
//
//  Created by Tao Li on 2018/7/5.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "TMTeacherDetailHeader.h"
#import "TMShopCourseModel.h"
#import "UIImage+TMimageCloor.h"
@implementation TMTeacherDetailHeader

//btn tag 50-54 FE7815
- (void)setTecherModel:(TMShopTeacherModel *)techerModel{
    _techerModel = techerModel;
    self.headerImage.contentMode = UIViewContentModeScaleAspectFit;
    self.headerImage.clipsToBounds = YES;
    [self.headerImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithBaseUrl:self.techerModel.image]] placeholderImage:kPlaceholder];
    self.teacherName.text = self.techerModel.name;
    self.phonelabel.text = self.techerModel.phone;
    for (NSInteger i = 0; i < self.techerModel.average; i ++) {
        UIButton *btn = self.starsBtns[i];
        btn.selected = YES;
    }
}
@end
